<%@ page contentType="text/html;charset=utf-8"%>
<%request.setCharacterEncoding("utf-8"); %>
<%@include file="../common/IncludeTop.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<head>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/default/easyui.css">
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.easyui.min.js"></script>
	<script type="text/javascript">
	</script>
</head>
<body>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td valign="top" width="20%" align="left">
<table align="left" bgcolor="#613E2E" border="0" cellspacing="2" cellpadding="2">
<tr><td>
<a style="text-decoration:none;" href="index.do">
<b><font color="white" size="4">&lt;&lt; 首页</font></b></a>
</td></tr>
</table>
</td><td valign="top" align="center">
<h2 align="center">购物车</h2>
<form method="post" action="${pageContext.request.contextPath}/item.do?path=updateCartQuantities">

<table   class="easyui-datagrid"  title="" style="width:800px;height:250px">
  <thead>
  <tr bgcolor="#cccccc">
  <th  data-options="field:'itemID',align:'center',width:150" ><b>原料编号</b></th><th  data-options="field:'description',align:'center',width:200" ><b>名称</b></th> <th  data-options="field:'quantity',align:'center',width:110" ><b>数量</b></th>  <th  data-options="field:'listPrice',align:'center',width:110" ><b>单价</b></th> <th  data-options="field:'totalCost',align:'center',width:135" ><b>总价</b></th>  <th data-options="field:'remove',align:'center',width:85" >&nbsp;</th>
  </tr>
  </thead>
  <tbody>
<c:if test="${cart.numberOfItems==0}">

<tr bgcolor="#FFFF88"><td colspan="8"><b>Your cart is empty.</b></td></tr>
</c:if>
<c:forEach items="${cartItems}" var="cartitem">

  <tr bgcolor="#FFFF88">
  <td><b>
  <a href="${pageContext.request.contextPath}/item.do?path=show&itemId=${cartitem.item.itemid}">

 ${cartitem.item.itemid}</a></b></td>
  <!-- <td>${cartitem.item.productid}</td> -->
  <td>
   ${cartitem.item.attr1}
  ${cartitem.item.attr2}
  ${cartitem.item.attr3}
  ${cartitem.item.attr4}
  ${cartitem.item.attr5}
 <!-- ${product.name}  -->   </td>
 <!--  <td align="center">${cartitem.inStock}</td> -->
  <td align="center">
  <input type="text" size="3" name="quantity${cartitem.item.itemid}" value="${cartitem.quantity}" /> 
  <td align="right">${cartitem.item.listprice}</td>
  <td align="right">${cartitem.total}</td>
  <td><a href="${pageContext.request.contextPath}/item.do?path=removeItemFromCart&workingItemId=${cartitem.item.itemid}">
  <img border="0" src="${pageContext.request.contextPath}/images/button_remove.gif" /></a></td>
  </tr>
</c:forEach>
</tbody>
<!-- <tr bgcolor="#FFFF88">
<td colspan="7" align="right">
<b>Sub Total: ${cart.subTotal} </b><br />
<input type="image" border="0" src="${pageContext.request.contextPath}/images/button_update_cart.gif" name="update" /></td>
<td>&nbsp;</td>
</tr> -->
</table>
<center>
<br>
  <span  style="width:130;">合计: ${cart.subTotal}元</span>
<input type="image" border="0" src="${pageContext.request.contextPath}/images/button_update_cart.gif" name="update" />

</center>
</form>


<br /><center><a href="${pageContext.request.contextPath}/item.do?path=checkout"><img border="0" src="${pageContext.request.contextPath}/images/button_checkout.gif" /></a></center>


</td>


<td valign="top" width="20%" align="right"><!--  <include file="IncludeMyList.jsp" %>--></td>
</tr>
</table>
</body>
<%@include file="../common/IncludeBanner.jsp"%>
<p><%@include file="../common/IncludeBottom.jsp"%></p>


